/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SystemC;

/**
 *
 * @author luisrocha
 */
public class Device {
    
    private long deviceID = 0;                      // device ID 
    private String deviceType = null;               // device Type (3 character code)
    private long deviceLastHeartbeat = 0;           // last heartbeat long milliseconds
        
    //create new device with id type and time in milliseconds
    public Device(long id, String type, long time)
    {             
         this.deviceID = id;
         this.deviceType = type;
         this.deviceLastHeartbeat = time;        
    } // constructor device     

    //in case the time is not avaiable the constructor assigns current system time
    public Device(long id, String type)
    {             
         this.deviceID = id;
         this.deviceType = type;
         this.deviceLastHeartbeat = System.currentTimeMillis();         
    } // constructor device        
    
    /**
     * @return the deviceID
     */
    public long getDeviceID() {
        return deviceID;
    }

    /**
     * @param deviceID the deviceID to set
     */
    public void setDeviceID(long deviceID) {
        this.deviceID = deviceID;
    }

    /**
     * @return the deviceType
     */
    public String getDeviceType() {
        return deviceType;
    }

    /**
     * @param deviceType the deviceType to set
     */
    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    /**
     * @return the deviceLastHeartbeat
     */
    public long getDeviceLastHeartbeat() {
        return deviceLastHeartbeat;
    }

    /**
     * @param deviceLastHeartbeat the deviceLastHeartbeat to set
     */
    public void setDeviceLastHeartbeat(long deviceLastHeartbeat) {
        this.deviceLastHeartbeat = deviceLastHeartbeat;
    }
    
    
    
} //Device
